home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / mac / PageMaker 6.5 SDK Mac / SourceCode / Includes / PMUtils.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-18  |  2.5 KB  |  74 lines  |  [TEXT/CWIE]

  1. /*
  2.  *--- PageMakerUtils.h -----------------------------------------------
  3.  * Copyright (c) 1995 Adobe Systems, Inc.  All rights reserved.
  4.  *
  5.  * Utility routines for making callbacks.  These were previously
  6.  * implemented as macros, but have been converted into functions
  7.  * to provide smaller footprint and compile time type-checking.
  8.  *
  9.  * $Revision:   1.2  $
  10.  *
  11.  *--------------------------------------------------------------------
  12.  */
  13. #ifndef __PageMakerUtils__
  14. #define __PageMakerUtils__
  15.  
  16. #include <string.h>
  17.  
  18. #include "PMTypes.h"
  19. #include "PMCommands.h"
  20. #include "PMQueries.h"
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. PMErr PBBinCommand(sPMParamBlockPtr thePB, ePMCommand op, ePMRefStyle theStyle, void * theRequest, unsigned long theRequestSize);
  27. PMErr PBBinCommandByShortValue(sPMParamBlockPtr thePB, ePMCommand op, unsigned short v);
  28. PMErr PBBinCommandByLongValue(sPMParamBlockPtr thePB, ePMCommand op, unsigned long v);
  29.  
  30. PMErr PBTextCommand(sPMParamBlockPtr thePB, ePMRefStyle theStyle, char * theText);
  31.  
  32. PMErr PBBinQuery(sPMParamBlockPtr thePB, ePMQuery op, ePMRefStyle rsy, void * r, unsigned long rsz);
  33. PMErr PBBinQueryWithParms(sPMParamBlockPtr thePB, ePMQuery op, 
  34.     ePMRefStyle theRequestStyle, void * theRequestData, unsigned long theRequestSize,
  35.     ePMRefStyle theReplyStyle,   void * theReplyData,   unsigned long theReplySize);
  36.  
  37. PMErr PBTextQuery(sPMParamBlockPtr thePB, char * theText, ePMRefStyle theStyle, char * theReplyBuf, unsigned long replyLen, ePMRefStyle theReplyStyle);
  38.  
  39.  
  40. // These functions get or store a C string into a buffer, adjusting
  41. // to insure that the buffer always starts on a two-byte boundary.
  42. size_t LPGetString(char * pDst, const void * pSrc, short len);
  43. size_t LPPutString(void * pDst, const char * pSrc);
  44.  
  45. size_t LPGetBuffer(char * pDst, const void * pSrc, short len);
  46. size_t LPPutBuffer(void * pDst, const char * pSrc, short maxlen);
  47.  
  48. size_t LPPutShort(void * pDst, short pSrc);
  49. size_t LPGetShort(short * pDst, const void * pSrc);
  50.  
  51. size_t LPPutLong(void * pDst, long pSrc);
  52. size_t LPGetLong(long * pDst, const void * pSrc);
  53.  
  54. size_t LPPutULong(void * pDst, unsigned long pSrc);
  55. size_t LPGetULong(unsigned long * pDst, const void * pSrc);
  56.  
  57. size_t LPPutHandle(void * pDst, PMHandle pSrc);
  58. size_t LPGetHandle(PMHandle * pDst, const void * pSrc);
  59.  
  60. void BuildErrorMessages(sPMParamBlockPtr thePB, char * errText, char * cantText);
  61.  
  62. #ifdef WIN32
  63.     extern PMHandle    hDllInstance;
  64. #endif //WINDOWS
  65.  
  66. #ifdef __cplusplus
  67. }
  68. #endif
  69.  
  70. #endif
  71.  
  72. // end of PageMakerUtils.h
  73.  
  74.